'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING,BOOLEAN } = Sequelize;
    await queryInterface.createTable("pos_category", {
      id: {
        type: INTEGER,
        primaryKey: true,
        autoIncrement: true,
        comment: "主键id，自增",
      },
      cateName: {
        type: STRING(30),
        allowNull: false,
        comment: "分类名称",
      },
      status: {
        type: BOOLEAN,
        defaultValue: true,
        comment: "状态 true：有效  false：冻结",
      },
      type: {
        type: INTEGER,
        comment: "类型 1：产品 2：案例 3：资讯",
      },
      sort: {
        type: INTEGER,
        comment: '排序'
      },
    })
  },

  down: async (queryInterface) => {
    await queryInterface.dropTable("pos_category");
  },
};
